import { ref } from 'vue';
import { defineStore } from 'pinia';

export const useCartListStore = defineStore('cartList', () => {
  const cartList = ref([]);

  function addToCartList(product) {
    cartList.value = [...cartList.value, product];
  }

  return { cartList, addToCartList };
});
